﻿<phone:PhoneApplicationPage
    x:Class="OnlineVideos.Views.Details"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:LART="clr-namespace:LART.Controls;assembly=LART.Controls.ScrollableTextBlock"
 xmlns:chart="clr-namespace:System.Windows.Controls.DataVisualization.Charting;assembly=System.Windows.Controls.DataVisualization.Toolkit"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d"
    shell:SystemTray.IsVisible="False">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="{StaticResource bipivot}">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="80"/>
        </Grid.RowDefinitions>
        <StackPanel Orientation="Horizontal" Grid.Row="0" Margin="0,0,0,0">
            <Image x:Name="imgLogo"  Style="{StaticResource PivotTitle}"  Margin="10,0,0,0"/>
            <TextBlock x:Name="tblkVideosTitle" Foreground="Gray" Style="{StaticResource DetailPagePivotTitle}"/>
        </StackPanel>
        <Grid x:Name="ContentPanel" Grid.Row="1">
            <Grid.RowDefinitions>
                
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>
            <StackPanel x:Name="Liststack" Grid.Row="0"   Visibility="Collapsed" >
                <StackPanel Orientation="Horizontal"  Margin="20,10,20,0">
                    <Image x:Name="FavImage" Height="20" Width="20" Margin="10,0,0,0" ></Image>
                    <TextBlock x:Name="tbTitle" Width="395" Margin="10,0,20,0" FontSize="28" TextWrapping="Wrap" Foreground="White" ></TextBlock>
                </StackPanel>

                <phone:WebBrowser x:Name="webBrowser1" Height="630" ></phone:WebBrowser>
                <!--<ListBox x:Name="TextList" SelectionChanged="TextList_SelectionChanged_1">
                    <ListBox.ItemTemplate>
                        <DataTemplate>
                            <StackPanel>
                                <TextBlock Width="100"  Margin="0,10,0,0" HorizontalAlignment="Left" FontSize="18" TextWrapping="Wrap" Foreground="White"  Text="{Binding date}" ></TextBlock>
                        <TextBlock Width="440" Margin="20,10,20,0" FontSize="22" TextWrapping="Wrap" Foreground="White" Text="{Binding value}" Height="120" TextTrimming="WordEllipsis"></TextBlock>
                       
                            </StackPanel>
                        </DataTemplate>
                    </ListBox.ItemTemplate>
                </ListBox>-->
             
            </StackPanel>
            <StackPanel x:Name="barstack" Grid.Row="0" Margin="0,0,0,0" Visibility="Collapsed">
                <ScrollViewer x:Name="scrvwrchart" Height="540" Width="480" VerticalScrollBarVisibility="Visible">
                    <chart:Chart x:Name="barChart" Margin="6,20,13,0" MinHeight="550" >
                        <chart:Chart.Series>
                            <chart:BarSeries x:Name="barseries" DependentValuePath="value" IndependentValuePath="date" ItemsSource="{Binding}">
                                <chart:BarSeries.DependentRangeAxis>
                                    <chart:LinearAxis Minimum="0" Orientation="X" ShowGridLines="True"></chart:LinearAxis>
                                </chart:BarSeries.DependentRangeAxis>
                                <chart:BarSeries.IndependentAxis>
                                    <chart:CategoryAxis Orientation="Y">
                                        <chart:CategoryAxis.AxisLabelStyle>
                                            <Style TargetType="chart:AxisLabel">
                                                <Setter Property="Visibility" Value="Collapsed" />
                                            </Style>
                                        </chart:CategoryAxis.AxisLabelStyle>
                                    </chart:CategoryAxis>
                                </chart:BarSeries.IndependentAxis>
                                <chart:BarSeries.DataPointStyle>
                                    <Style TargetType="chart:BarDataPoint">
                                        <Setter Property="Background" Value="{StaticResource PhoneAccentBrush}" />
                                        <Setter Property="Template">
                                            <Setter.Value>
                                                <ControlTemplate TargetType="chart:BarDataPoint">
                                                    <Grid>
                                                        <Rectangle Fill="{TemplateBinding Background}" Stroke="Black" Height="50"/>
                                                        <Grid Margin="20, -5, -350, 0" HorizontalAlignment="Left" VerticalAlignment="Center" Height="50">
                                                            <StackPanel Orientation="Horizontal">
                                                                <TextBlock Text="{TemplateBinding FormattedIndependentValue}" FontWeight="Light" Margin="2" Foreground="{StaticResource PhoneForegroundBrush}" VerticalAlignment="Center"/>
                                                            </StackPanel>
                                                        </Grid>
                                                    </Grid>
                                                </ControlTemplate>
                                            </Setter.Value>
                                        </Setter>
                                    </Style>
                                </chart:BarSeries.DataPointStyle>
                            </chart:BarSeries>
                        </chart:Chart.Series>
                    </chart:Chart>
                </ScrollViewer>
            </StackPanel>
            <TextBlock x:Name="ErrorText" Text="Historical Data Not Available" Foreground="Gray" FontSize="28" HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="Collapsed"></TextBlock>
        </Grid>
 <StackPanel Name="adstackplFavorites" Grid.Row="2" Orientation="Vertical" Margin="0,10,0,0" >
        </StackPanel>
    </Grid>
    <phone:PhoneApplicationPage.ApplicationBar>
        
        <shell:ApplicationBar x:Name="appmenu"  IsVisible="True" IsMenuEnabled="True">

            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem x:Name="pin" Text="pin to start page"  Click="pin_Click_1" />
                <shell:ApplicationBarMenuItem x:Name="share" Text="Share Web Tile" Click="share_Click" />
                <shell:ApplicationBarMenuItem x:Name="Reminder" Text="Add Reminder" Click="Reminder_Click_1"/>
                <shell:ApplicationBarMenuItem x:Name="Fav" Text="add as Favourite" Click="Fav_Click"/>
                <shell:ApplicationBarMenuItem x:Name="Browser" Text="Open in Browser" Click="Browser_Click"/>
                <shell:ApplicationBarMenuItem x:Name="rate" Text="rate this Web Tile" Click="rate_Click" />
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>
</phone:PhoneApplicationPage>